package com.singleton.demo04;

/**
 * 没有数据库的序列键生成器
 */
public class Client {
    public static void main(String[] args) {
        for (int i = 0; i < 5000; i++) {
            new Thread(()->{
                KeyGenerator instance = KeyGenerator.getInstance();
                System.out.println(Thread.currentThread().getName()+instance.getKey());
            },i+"--->").start();
        }
    }
}
